package com.itheima.entry;

import com.itheima.controller.IManagerController;
import com.itheima.controller.ISubwayController;
import com.itheima.controller.impl.ManagerControllerImpl;
import com.itheima.controller.impl.SubwayControllerImpl;

import java.io.IOException;
import java.util.Scanner;

public class Entry {

    public static void main(String[] args) throws IOException {
        System.out.println("欢迎来到地铁站管理系统,请先登录");
        Scanner sc= new Scanner(System.in);
        System.out.println("请输入工号");
        String sid = sc.nextLine();
        System.out.println("请输入姓名");
        String name = sc.nextLine();
        IManagerController controller= new ManagerControllerImpl();
       boolean flag= controller.login(sid,name);
        if(flag){
                //进入系统
            ISubwayController subwayController= new SubwayControllerImpl();
            subwayController.start();
        }else {
            System.out.println("登陆失败,再见");

        }

    }
}
